Conditions | 6 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | 'use strict' |
||
16 | jsonfile.readFile(modulePath, function (err, module) { |
||
17 | if (err) { |
||
18 | output.err('Error reading module.json: ' + err) |
||
19 | return |
||
20 | } |
||
21 | if (!('slug' in module) || !module.slug || typeof module.slug !== 'string' || !module.slug.length) { |
||
22 | output.err('Please set a valid value for module.slug') |
||
23 | return |
||
24 | } |
||
25 | |||
26 | callback(module) |
||
27 | }) |
||
28 | } |
||
31 |